#include <REGX52.H>
#include "LCD1602.h"
#include "Delay.h"
#include "Timer.h"
unsigned int i=0;
unsigned int T0Count=0;
void main(){
	LCD1602_Init();
	Timer0_Init();
	LCD1602_PrintString(1,1,"BY ZEPHYR");
	Delay(1000);
	LCD1602_WriteCommand(0x01);
	while(1)
	{
		LCD1602_PrintString(1,1,"COUNT:");
		LCD1602_PrintNum(1,7,i,3);
	}
}

void Timer0_Rountine(void) interrupt 1
{
	TL0 = 0x66;
	TH0 = 0xFC;
	T0Count++;
	if(T0Count>=1000)
	{
		T0Count=0;
		i++;
	}
}